<?php

  //include function files for this application
  require_once('funs/bbox_fns.php');
  require_once('main.php');
  
  //creating short variable name
  $email = $_POST['email'];
  
  try{
  
    $passwd = reset_password($email);
    notify_password($email, $passwd);
    
    $tpl->display("forgot_passwd.html");
  	
  }
  catch(Exception $e){
  
  	  $tpl->assign('error', $e->getMessage());
      $tpl->assign('msg', 'Your password could not be reset. Please try again later.');
      $tpl->assign('back_link', 'index.php');
      $tpl->display("error.html");
      exit;	  
  	
  }


?>